﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccessLayer;
using System.Data;
using System.Data.OleDb;
using InfoLayer;

namespace ControlLayer
{
    public class PhongControl
    {
        private PhongDataAccess PhongDA = new PhongDataAccess();

        public DataTable LayBangDanhSachPhong()
        {
            return PhongDA.LayBangDanhSachPhong();
        }

        public void Insert(ref PhongInfo phongInfo)
        {
            PhongDA.Insert(ref phongInfo);
        }

        public void Update(PhongInfo phongInfo)
        {
            PhongDA.Update(phongInfo);
        }

        public void Delete(PhongInfo phongInfo)
        {
            PhongDA.Delete(phongInfo);
        }

        public string TaoMaTuDong(string maGoc, int batDau)
        {
            return PhongDA.TaoMaTuDong(maGoc, batDau);
        }

        public DataTable LayDonGia(LoaiPhongInfo loaiPhongInfo, String _MaLoaiPhong)
        {
            return PhongDA.LayDonGia(loaiPhongInfo, _MaLoaiPhong);
        }

        public DataTable LayDSPhongTrong()
        {
            return PhongDA.LayDSPhongTrong();
        }

        public DataTable LayDSPhongDaThue()
        {
            return PhongDA.LayDSPhongDaThue();
        }

        public void Update_TinhTrangPhong(String _MaPhong, bool isTinhTrangPhong)
        {
            PhongDA.Update_TinhTrangPhong(_MaPhong, isTinhTrangPhong);
        }

         
        public DataTable Timkiemphong(PhongInfo phonginfo, bool isCheck)
        {
            return PhongDA.Timkiemphong(phonginfo, isCheck);
        }
    }
}
